<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>学生添加 -  学生管理系统</title>
    <meta name="author" content="yinqi">
    <link href="../../css/bootstrap.min.css" rel="stylesheet">
    <link href="../../css/materialdesignicons.min.css" rel="stylesheet">
    <link href="../../css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">

    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside th:replace="fragment/_fragment::navbar"></aside>


        <!--头部信息-->
        <header th:replace="fragment/_fragment::sidebar"></header>


        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">
                                <form th:action="@{/add/addStudent}" method="post">

                                    <div class="form-group">
                                        <label for="name">姓名：</label>
                                        <input type="text" class="form-control" id="name" name="name" placeholder="请输入姓名">
                                    </div>
                                    <div class="form-group">
                                        <label for="age">年龄：</label>
                                        <input type="text" class="form-control" id="age" name="age" placeholder="请输入年龄">
                                    </div>

                                    <div class="form-group">
                                        <label>性别：</label>
                                        <input type="radio" name="sex" value="男" checked="checked"/>男
                                        <input type="radio" name="sex" value="女"/>女
                                    </div>
                                    <div class="form-group">
                                        <label for="subject">专业：</label>
                                        <input type="text" class="form-control" id="subject" name="subject" placeholder="请输入专业">
                                    </div>
                                    <div class="form-group">
                                        <label for="dept">系别：</label>
                                        <input type="text" class="form-control" id="dept" name="dept" placeholder="请输入系别">
                                    </div>
                                    <div class="form-group">
                                        <label for="addr">籍贯：</label>
                                        <input type="text" class="form-control" id="addr" name="addr" placeholder="请输入籍贯">
                                    </div>

                                    <div class="form-group" style="text-align: center">
                                        <input class="btn btn-primary" type="submit" value="提交" />
                                        <input class="btn btn-default" type="reset" value="重置" onclick="reset()"/>
                                        <input class="btn btn-default" type="button" value="返回" onclick="goBack()"/>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>

    </div>
</div>

<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../../js/main.min.js"></script>
<script src="../../layer/layer.js"></script>
<script type="text/javascript">
    function reset(){
        $("#id").val("");
        $("#name").val("");
        $("#age").val("");
        $("#sex").val("男");
        $("#subject").val("");
        $("#dept").val("");
        $("#addr").val("");
    }
    function goBack() {
        window.history.back()
    }

</script>
</body>
</html>